package com.loobot.album.net;

/**
 * 错误码对应数据库error_code表的Key值
 * Created by Administrator on 2017/2/23 0023.
 */
public enum ErrorCode {
    RESULT_SUCCESS("Success","成功"),
    SAVE_ERR("Save Error","保存失败"),
    DETECH_FIRST("save a face first","尚未录入人脸"),
    ADD_FAILED("Add failed","添加失败"),
    NOT_IMAGE("not a image", "所传非图片文件"),
    DB_EXCEPTION("Database exception","数据库错误"),
    DETECH_FAILED("detech failed","识别失败"),
    ARGUMENT_ERR("Argument error", "参数错误"),
    FILE_NULL("upload file null","上传文件为空"),
    UPLOAD_FAILED("upload failed","上传文件失败"),
    NO_FILE("file not exit","文件不存在"),
    ALREADY_EXIST("Already exist","已存在"),
    NOT_EXIST("not exist","不存在"),
    INVALID_ACCESS_KEY("Invalid accessKey","非法accesskey"),
    NEED_AUTHORD("No Authorization","没有Authorization"),
    EXCEPTION_ERR("Exception error","数据异常"),
    TOO_MUCH_FACE("Too much face","人脸不止一个"),
    INVALID_SIGN("Invalid sign","无效sign"),
    REQUEST_FAILED("Request failed","请求失败"),
    INVALID_AUTHORIZATION_FORMAT("Invalid authorization format","Authorization格式不对"),
    JSON_ERR("Json error","json错误");
    private String code;
    private String message;


    ErrorCode(String code) {
        this.code = code;
    }

    ErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
